<template>
  <div id="app">
    <v-chart class="my-chart" :options="bar"/>
  </div>
</template>
<script>
import ECharts from "vue-echarts/components/ECharts";
import "echarts/lib/chart/bar";
export default {
  name: "App",
  components: {
    "v-chart": ECharts
  },
  data: function() {
    return {
      bar: {
        title: {
          text: "门店月度销量统计"
        },
        tooltip: {},
        legend: {
          data: ["销量","销售额"]
        },
        xAxis: {
          data: ["go！猫粮", "冠能猫粮", "猫砂", "猫砂盆", "猫爬架", "玩具"]
        },
        yAxis: {},
        series: [
          {
            name: "销量",
            type: "bar",
            data: [20, 35, 36, 7, 3, 6]
          },
          {
            name: "销售额",
            type: "bar",
            data: [80, 100,123, 43, 56, 23]
          }
        ]
      }
    };
  }
};
</script>
<style>
.my-chart {
  width: 800px;
  height: 500px;
}
</style>